function l(s)
l="{B96B3C"&s&"-0728-11D3-9D7B-0000F81EF32E}"
end function
 
BMP=l("AB")
PNG=l("AF")
GIF=l("B0")
JPG=l("AE")
TIF=l("B1")
 
Set Img=CreateObject("WIA.ImageFile")
For Each argv In WScript.Arguments
a="a.png"'argv
Img.LoadFile argv
next
w=1'Img.Width
h=1'Img.Height


fm=PNG	'eval(Img.FileExtension)
 
Set v = CreateObject("WIA.Vector")
For i=1 To w*h
v.Add &HFF000000
Next
Set Img=v.ImageFile(w,h)
 
Set IP = CreateObject("WIA.ImageProcess")
IP.Filters.Add IP.FilterInfos("Convert").FilterID
IP.Filters(1).Properties("FormatID").Value = fm
Set Img = IP.Apply(Img)
CreateObject("Scripting.FileSystemObject").DeleteFile a
Img.SaveFile a